package com.hebeu.gfh.mapper;

import com.hebeu.gfh.pojo.po.Activities;
import com.hebeu.gfh.pojo.vo.pages;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Author: 刘剑利
 * @Version: v1.0
 */
@Repository
@Mapper
public interface ActivitiesMapper {

    //获取所有的活动列表
    public List<Activities> findAllActivities(pages page);

    List<Activities> findActivitiesByclubId(int clubId);

    Activities findActivitiesByactivityId(int activityId);

    List<Activities> findActivityByuserId(int userId);

    public int findActivityNum();

    public void initActivity(Activities activities);

    public int isparticipate(@Param("activityId")  int activityId,@Param("userId")  int userId);

    public void addActivityRegistration(@Param("activityId")  int activityId,@Param("userId")  int userId);

    public void deleteActivityRegistration(@Param("activityId")  int activityId,@Param("userId")  int userId);

    public int findParticipant(int activityId);

    public List<Activities> findActivityByuserId1(pages pages);

    public int getActivityNum(int userId);

    public List<Activities> getActivityInfoByName(pages pages);

    public void deleteActivityById(int activityId);
}
